import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface BaseApiReq extends BasicModel<BaseApiReq> {
 
}

export interface BadeApiResult extends BasicModel<BadeApiResult> {

}

export const precreateOrder = (params?: Recordable | any) =>{
  
  return defHttp.postJson<Recordable>({ url: adminPath+'/dpbaseapi/precreateOrder', params });

}

export const createOrder = (params?: BaseApiReq | any) =>{
  
  return defHttp.postJson<BadeApiResult>({ url: adminPath+'/dpbaseapi/createOrder', params });

}

export const queryOrder = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/queryOrder', params });

}

export const kclistapi = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/kclistapi', params });

}

export const newslistapi = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/newslistapi', params });

}
export const qyjlistapi = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/qyjlistapi', params });

}

export const userorderlistapi = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/userorderlistapi', params });

}
export const memberinfo = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/memberinfo', params });

}

export const viplist = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/viplist', params });

}

export const ailist = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/ailist', params });

}
export const updateHuihuaid = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/updateHuihuaid', params });

}
export const jianAicount = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/jianAicount', params });

}

export const addusercart = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/addusercart', params });

}

export const getUserCartList = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/getUserCartList', params });

}

export const clearallUserCart = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/clearallUserCart', params });

}

export const removeCartById = (params?: BaseApiReq | any) =>{
  
  return defHttp.post<BadeApiResult>({ url: adminPath+'/dpbaseapi/removeCartById', params });

}

export const getDomain = (params?: any) => {
  return defHttp.get<Recordable>({ url: adminPath+'/dpbaseapi/getDomain' ,params});
}

export const getUserInfo = (params?: any) => {
  return defHttp.get<Recordable>({ url: adminPath+'/dpbaseapi/getUserInfo' ,params});
}

export const getDictValue = (params?: any) => {
  const {dictType} = params;
  return defHttp.get<Recordable>({ url: adminPath+'/dpbaseapi/getDictValue' ,params});
}

